package com.hq.ims.data.vo.auth;

import lombok.Data;

import java.time.LocalDateTime;

/**
 * TODO
 */
@Data
public class BaseRowAuthVo {

    //能否编辑
    private Boolean isCanEdit = false;
    //能否删除
    private Boolean isCanDel = false;
    //能否撤回流程
    private Boolean isCanBackProcess = false;

    //新版本时间
    private LocalDateTime newVersionDateTime = LocalDateTime.of(2024, 5, 1, 0, 0, 0);

    public BaseRowAuthVo() {
    }

    public BaseRowAuthVo(Boolean isCanEdit, Boolean isCanDel, Boolean isCanBackProcess) {
        this.isCanEdit = isCanEdit;
        this.isCanDel = isCanDel;
        this.isCanBackProcess = isCanBackProcess;
    }

    /**
     * @param dateTime 时间
     * @return true 允许操作,false不允许操作
     */
    public boolean isAllowBaseOperations(LocalDateTime dateTime) {
        return true;
        //指定时间在传进来的时间之后,表示禁止操作
//        return newVersionDateTime.isBefore(dateTime);
    }
}
